<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>Define a Property with Change Notification</Title>
			<Shortcut>PropertyINPC</Shortcut>
			<Description>Code snippet for a property which raises INotifyPropertyChanged</Description>
			<Author>Colin Eberhardt</Author>
			<SnippetTypes>
				<SnippetType>Expansion</SnippetType>
			</SnippetTypes>
		</Header>
		<Snippet>
			<Declarations>
				<Literal>
					<ID>type</ID>
					<ToolTip>Property Type</ToolTip>
					<Default>string</Default>
				</Literal>
        <Literal>
          <ID>summary</ID>
          <ToolTip>Summary Documentation</ToolTip>
          <Default>Gets / sets the property value</Default>
        </Literal>
				<Literal>
					<ID>property</ID>
					<ToolTip>Property Name</ToolTip>
					<Default>MyProperty</Default>
				</Literal>
				<Literal>
					<ID>field</ID>
					<ToolTip>Backing Field</ToolTip>
					<Default>_myproperty</Default>
				</Literal>
        <Literal>
          <ID>defaultValue</ID>
          <ToolTip>Field default value</ToolTip>
          <Default>null</Default>
        </Literal>
			</Declarations>
			<Code Language="csharp">
				<![CDATA[

    /// <summary>
    /// Field which backs the $property$ property
    /// </summary>
    private $type$ $field$ = $defaultValue$;

    public static readonly string $property$Property = "$property$";
				
    /// <summary>
    /// $summary$
    /// </summary>
    public $type$ $property$
    {
	    get { return $field$; }
	    set
	    {
		    if ($field$ == value)
			    return;
			
		    $field$ = value;
        
        On$property$Changed(value);
		
		    OnPropertyChanged($property$Property);
	    }
    }
    
    /// <summary>
    /// Invoked when the value of $property$ changes
    /// </summary>
    partial void On$property$Changed($type$ value);
    $end$]]>
			</Code>
		</Snippet>
	</CodeSnippet>
</CodeSnippets>
